package com.youwu.weather.service.impl;

import com.youwu.weather.service.WeatherDataService;
import com.youwu.weather.service.WeatherReportService;
import com.youwu.weather.vo.HeWeather6;
import com.youwu.weather.vo.WeatherResponse;
import com.youwu.weather.vo.WeatherType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WeatherReportServiceImpl implements WeatherReportService {

    @Autowired
    private WeatherDataService weatherDataService;

    @Override
    public List<HeWeather6> getDataByCity(WeatherType weatherType, String city) {
        WeatherResponse response = weatherDataService.getDataByCityName(weatherType, city);
        return response.getHeWeather6();
    }
}
